# @Author: twisly
# @Date:   2021-04-12 17:41:10
# @Last Modified by:   twisly
# @Last Modified time: 2021-04-12 17:55:53

nginx_hosts=(172.31.65.68)
ngx_upstream_file="/etc/nginx/servers/useless.platform.upstream"
target_host="172.31.65.68"

for nginx_host in ${nginx_hosts[@]}; do
	
	ssh -o StrictHostKeyChecking=no -p 59522 root@${nginx_host} "/data/deployment/bin/down_nginx.sh ${target_host} ${ngx_upstream_file}"
done


sleep 3

for nginx_host in ${nginx_hosts[@]}; do
	
	ssh -o StrictHostKeyChecking=no -p 59522 root@${nginx_host} "/data/deployment/bin/up_nginx.sh ${target_host} ${ngx_upstream_file}"
done